﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace CiliaryDetector
{
    public class SliderToTextBoxBinding : INotifyPropertyChanged
    {
        private double _curval = 10;
        public double CurVal
        {
            get { return _curval; }
            set
            {
                if (_curval != value)
                {
                    _curval = value;
                    OnPropertyChanged("CurVal");
                }
            }
        }
        private double _sense = 10;
        public double Sense
        {
            get { return _sense; }
            set
            {
                if (_sense != value)
                {
                    _sense = value;
                    OnPropertyChanged("Sense");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected void OnPropertyChanged(string property)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(property));
            }
        }

    }
}
